<?php

$_this =& $this;

/* @var $_this View */
/* @var $form FormHelper */
/* @var $editForm EditFormHelper */
/* @var $html HtmlHelper */
/* @var $ehtml EHtmlHelper */
/* @var $javascript JavascriptHelper */
/* @var $jqax JqaxHelper */
/* @var $filterBlock FilterBlock */

?><?=$editForm->create($modelName, array('url'=>("/{$url_part}/".($this->data[$modelName]['id']).'/refill'), 'allowInput' => $this->data[$modelName]['__allows']['update']));?><?php

	?><?=$editForm->text("bill", null, array('required' => true, 'vertical' => false, 'value' => $client_id, 'type' => 'hidden'));?><?php
    $editForm->data[$modelName]['currency'] = "EP";
	?><?=$editForm->amount(array("amount", "currency"), __d($po_domain, 'amount', true), array("EP" => "EP"), array('allowInputCurrency' => false));?><?php
	?><?=$editForm->text("comment",__d($po_domain, 'comment', true));?><?php
	
	?><?=$editForm->startSet(__d($po_domain, 'account_title', true));?><?php
		?><?=$editForm->cell($this->renderElement("amount", array("amount"=>$this->data[$modelName]['balance'], "currency" => "EP")));?><?php
	?><?=$editForm->endSet();?><?php

	?><?=$editForm->startSet(__d($po_domain, 'organization_title', true));?><?php
		?><?=$editForm->text("name", __d($po_domain, 'name', true), array('required' => true, 'vertical' => false, 'allowInput' => false));?><?php
		?><?=$editForm->text("contract", __d($po_domain, 'contract', true), array('required' => true, 'vertical' => false, 'allowInput' => false));?><?php
		?><?=$editForm->date("contract_start_date", __d($po_domain, 'contract_start_date', true), array('required' => true, 'allowInput' => false));?><?php
		?><?=$editForm->date("contract_finish_date", __d($po_domain, 'contract_finish_date', true), array('required' => true, 'allowInput' => false));?><?php
		?><?=$editForm->text("reg_code", __d($po_domain, 'reg_code', true), array('required' => true, 'vertical' => false, 'allowInput' => false));?><?php
	?><?=$editForm->endSet();?><?php

	$buttonsHTML = '';
	$buttonsHTML .= (strlen($buttonsHTML) ? ' ' : '').$editForm->back("/{$url_part}/");
	if ($this->data[$modelName]['__allows']['update']) {
	   $buttonsHTML .= (strlen($buttonsHTML) ? ' ' : '').$editForm->submit(__d($po_domain, ('refill'), true), array());
	}
	if (strlen($buttonsHTML)) {
    	?><?=$editForm->cell($buttonsHTML);?><?php
	}

?><?=$editForm->end();?><?php

?>